// import elementLangEn from 'element-ui/lib/locale/lang/en'
// import elementLangCN from 'element-ui/lib/locale/lang/zh-CN'
import VueI18n from 'vue-i18n'
import Vue from 'vue'
const en = {
  name: 'name'
}
const zhcn = {
  name: '姓名'
}
Vue.use(VueI18n)
const messages = {
  en: { ...en },
  'zh-cn': { ...zhcn }
}
const i18n = new VueI18n({
  locale: 'zh-cn', // 设置地区
  messages, // 设置地区信息
  silentTranslationWarn: true
})
export default i18n
export const changelange = () => {
  if (i18n.locale === 'zh-cn') {
    i18n.locale = 'en'
  } else {
    i18n.locale = 'zh-cn'
  }
}
